package com.example.superoa.model.service;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.example.superoa.common.Shijian;
import com.example.superoa.model.dao.KqLeaveTypeDao;
import com.example.superoa.model.dao.QingjiaDao;
import com.example.superoa.model.dao.StaffDao;
import com.example.superoa.model.mappers.LeaveClassMapper;
import com.example.superoa.model.mappers.LeaveMapper;
import com.example.superoa.model.pojos.LeaveType;
import com.example.superoa.model.pojos.Qingjia;
import com.example.superoa.model.pojos.Staff;

@Service
@Transactional(rollbackFor=Exception.class)
public class LeaveClassService {
	@Autowired 
	private LeaveClassMapper map;
	
	
	@Autowired
	private KqLeaveTypeDao l_dao;
	
	private Shijian  sj=new Shijian();
	
	public JSONArray LeaveSelectAll() {
		return map.LeaveClassSelectAll();
	}
	
	public JSONObject selectQingId(int id) {
		return map.selectQingId(id);
	}
	public JSONArray selectQi() {
		return map.selectQi();
	}
	public void addQingjia(LeaveType lt) {
		l_dao.save(lt);
	}
	public void delectqing(int id) {
		l_dao.deleteById(id);
	}
	public LeaveType selectid(int id) {
		return l_dao.findById(id).get();
	}
	
}
